Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp Reproducible Builds #56

Merged
merged 41 commits into from
Jul 26, 2024
Merged

Revamp Reproducible Builds #56

merged 41 commits into from
Jul 26, 2024

Conversation

rauljordan
Copy link
Contributor

@rauljordan rauljordan commented Jul 23, 2024

This PR contains major changes to reproducible deployments and verification of Stylus contracts. To read the motivation, and understand exactly how it works, see Contract Verification For Stylus Programs.

Changelog

  • Standardizes Docker image builds to x86 arch, making sure that a program can be reproducibly deployed on Mac M1, for example, and verified on ubuntu x86, as Mac's can do this through rosetta
  • Removes the --rust-stable flag as it instead relies on the Stylus program's rust-toolchain.toml file to specify a version
  • Removes the reproducible subcommand of Cargo stylus, as instead deploy, check, and verify are made reproducible by default by running in a Docker environment
  • Rejects rust-toolchain.toml files that do not contain a specific release channel, for instance, stable, nightly, beta are not enough. A user must declare a specific nightly version of a major.minor.patch version
  • Rejects reproducible builds on Native windows, and instead requires the user to build in WSL (Windows Linux Subsystem)
  • Standardizes Docker image builds for Cargo Stylus to use the rust:1.79 image. This is simply used for installing cargo, but the user will specify the exact toolchain they plan to use for building and deploying their actual project
  • Allows skipping reproducible verification by using the --no-verify flag
  • Ensures that the Docker image being built uses the correct, user-specified toolchain and the cargo stylus version of the host. The verifier must know the cargo stylus version the deployer used

@rauljordan rauljordan changed the title Standardize Reproducible Builds to x86 Revamp Reproducible Builds Jul 25, 2024
check/src/main.rs Outdated Show resolved Hide resolved
Copy link
Member

@joshuacolvin0 joshuacolvin0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

check/src/main.rs Outdated Show resolved Hide resolved
check/src/main.rs Outdated Show resolved Hide resolved
@rauljordan rauljordan marked this pull request as draft July 26, 2024 17:13
@rauljordan rauljordan marked this pull request as ready for review July 26, 2024 17:13
Copy link
Member

@joshuacolvin0 joshuacolvin0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rauljordan rauljordan merged commit ce44f66 into main Jul 26, 2024
7 checks passed
@rauljordan rauljordan deleted the docker-checks branch July 26, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants